package com.dhms.vostok1.adapter


import androidx.databinding.BindingAdapter
import com.dhms.vostok1.base.BindingCommand
import com.google.android.material.appbar.MaterialToolbar

object ToolbarBindingAdapter {
    @JvmStatic
    @BindingAdapter(value = ["navigationClickListener"], requireAll = false)
    fun setNavigationClickListener(toolbar: MaterialToolbar, bindingCommand: BindingCommand) {
        toolbar.setNavigationOnClickListener { bindingCommand.execute() }
    }
}